<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>>>--校园失物招领系统--用户登录-->></title>
<link rel="stylesheet" type="text/css" href="static/eazyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="static/eazyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="static/eazyui/demo/demo.css">
<script type="text/javascript" src="static/eazyui/jquery.min.js"></script>
<script type="text/javascript" src="static/eazyui/jquery.easyui.min.js"></script>
<style type="text/css">

</style>
</head>
<body>
	<!-- <div style="margin:20px 0;"></div>
	<div style="width: 450px;margin:auto;">
	<form action="login!login.action" method="post">
		<div id="login" class="easyui-panel" title="欢迎登录校园失物招领系统" style="text-align:center;width:400px;padding:30px 70px 20px 70px">
			<div style="margin-bottom:10px">
				<input name="user.userCode" class="easyui-textbox" style="width:100%;height:40px;padding:12px" data-options="prompt:'userCode',iconCls:'icon-man',iconWidth:38">
			</div>
			<div style="margin-bottom:20px">
				<input name="user.password" class="easyui-textbox" type="password" style="width:100%;height:40px;padding:12px" data-options="prompt:'password',iconCls:'icon-lock',iconWidth:38">
			</div>
			<div style="margin-bottom:20px">
				<input type="checkbox" checked="checked">
				<input name="action" type="hidden" value="nomal" />
				<span>记住密码</span>
			</div>
			<div>
				<a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="padding:5px 0px;width:30%;">
					<span style="font-size:14px;"><button>登  录</button></span>
				</a>
				<a href="register.jsp" class="easyui-linkbutton" data-options="iconCls:'icon-ok'" style="padding:5px 0px;width:30%;">
					<span style="font-size:14px;">注  册</span>
				</a>
			</div>
		</div>
	</form>
	</div>
	 -->
	<form id="form1" onsubmit="return false" action="##" method="post">
        <p>用户名：<input name="map.name" type="text" id="txtUserName" tabindex="1" size="15" value=""/></p>
        <!-- <p>密　码：<input name="map.pdescription" type="password" id="TextBox2" tabindex="2" size="16" value=""/></p>
         --><p><input type="button" value="登录" onclick="login()">&nbsp;<input type="reset" value="重置"></p>
    </form>

	<script type="text/javascript">
	function login() {
        $.ajax({
        //几个参数需要注意一下
            type: "POST",//方法类型
            dataType: "json",//预期服务器返回的数据类型
            url: "login!login.action" ,//url
            data: $('#form1').serialize(),
            success: function (result) {
                console.log(result);//打印服务端返回的数据(调试用)
                if (result.resultCode == 200) {
                    alert("SUCCESS");
                }
                ;
            },
            error : function() {
                alert("异常！");
            }
        });
    }
	</script>

</body>
</html>